import type { LoginCodeData } from "@/types/user";
import { defineStore } from "pinia";
import { computed, ref } from "vue";

export const useUserStore = defineStore('user', () => {
    const user = ref<LoginCodeData>({} as LoginCodeData)
    const setUser = (u:LoginCodeData) => {
        user.value = u
    }
    return { user, setUser}
}, {
    // 忽略不看这句代码---放弃ts检查
    // @ts-ignore
    unistorage: true
   
})